<?php /* Smarty version Smarty-3.1.12, created on 2013-03-20 21:39:10
         compiled from "D:\wamp\www\acps_new\templates\client\home.tpl" */ ?>
<?php /*%%SmartyHeaderCode:18707513bb9f7a56334-29976277%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f1ff8a4061e58af14c9231a9005fdf1cc0c4a60e' => 
    array (
      0 => 'D:\\wamp\\www\\acps_new\\templates\\client\\home.tpl',
      1 => 1363815405,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '18707513bb9f7a56334-29976277',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_513bb9f7a577b0_76483964',
  'variables' => 
  array (
    'data' => 0,
    'client' => 0,
    'record' => 0,
    'user' => 0,
    'task' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_513bb9f7a577b0_76483964')) {function content_513bb9f7a577b0_76483964($_smarty_tpl) {?><div class="client-home">
    <div class="menu">
        <?php if (count($_SESSION['user']['clients'])>1){?>
            <form action="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=main" id="clientHomeForm" method="post">
                <select name="client" size="1" onchange="submitForm('clientHomeForm')">
                    <?php  $_smarty_tpl->tpl_vars["client"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["client"]->_loop = false;
 $_from = $_SESSION['user']['clients']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["client"]->key => $_smarty_tpl->tpl_vars["client"]->value){
$_smarty_tpl->tpl_vars["client"]->_loop = true;
?>
                        <option <?php if ($_smarty_tpl->tpl_vars['client']->value==$_SESSION['home_client']){?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['client']->value;?>
"><?php echo client_obj::smarty_getClientName(array('id'=>$_smarty_tpl->tpl_vars['client']->value),$_smarty_tpl);?>
</option>
                    <?php } ?>
                </select>
            </form>
        <?php }?>
    </div>
    <h1>
        <?php echo $_smarty_tpl->tpl_vars['data']->value['client_data']['fullName'];?>

    </h1>
    <div class="left-home">
        <div class="box-left">
            <div>
                <h4>
                    Timesheet records - <?php echo $_smarty_tpl->tpl_vars['data']->value['date1'];?>

                </h4>
                <table>
                    <tr>
                        <th>Date</th>
                        <th>Description</th>
                        <th>Type of record</th>
                        <th>Amount</th>
                        <th>Tariff</th>
                        <th>Unit price</th>
                        <th>Added by</th>
                    </tr>
                    <?php  $_smarty_tpl->tpl_vars["record"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["record"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value['records_current']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["record"]->key => $_smarty_tpl->tpl_vars["record"]->value){
$_smarty_tpl->tpl_vars["record"]->_loop = true;
?>
                        <tr>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['date_formated'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['description'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['type_info']['type_of_record'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['amount'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['tariff_info']['title'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['unit_price'];?>

                            </td>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['record']->value['user_info']['users_id']!=0){?>
                                    <?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['surname'];?>

                                <?php }else{ ?>
                                    -
                                <?php }?>
                            </td>
                        </tr>
                    <?php } ?>
                    <tr>
                        <th colspan="7">&nbsp;</th>
                    </tr>
                    <tr>
                        <td colspan="3"><b>Total:</b></td>
                        <td colspan="4"><b><?php echo $_smarty_tpl->tpl_vars['data']->value['current_sum'];?>
</b></td>
                    </tr>
                    <tr>
                        <td style="border-bottom: 1px solid #066" colspan="3">Prepaid monthly range:</td>
                        <td style="border-bottom: 1px solid #066" colspan="4"><?php echo $_smarty_tpl->tpl_vars['data']->value['client_data']['monthlyPrepaid'];?>
</td>
                    </tr>
                    <tr>
                        <th style="color: #066; border-bottom: 0px solid white" colspan="3">Overrange:</th>
                        <th style="color: #066; border-bottom: 0px solid white" colspan="4"><?php echo $_smarty_tpl->tpl_vars['data']->value['overrange'];?>
</th>
                    </tr>
                </table>
            </div>
        </div>

        <div class="box-left">
            <div>
                <h4>
                    Timesheet records - <?php echo $_smarty_tpl->tpl_vars['data']->value['date2'];?>

                </h4>
                <table>
                    <tr>
                        <th>Date</th>
                        <th>Description</th>
                        <th>Type of record</th>
                        <th>Amount</th>
                        <th>Tariff</th>
                        <th>Unit price</th>
                        <th>Added by</th>
                    </tr>
                    <?php  $_smarty_tpl->tpl_vars["record"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["record"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value['records_last']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["record"]->key => $_smarty_tpl->tpl_vars["record"]->value){
$_smarty_tpl->tpl_vars["record"]->_loop = true;
?>
                        <tr>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['date_formated'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['description'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['type_info']['type_of_record'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['amount'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['tariff_info']['title'];?>

                            </td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['record']->value['unit_price'];?>

                            </td>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['record']->value['user_info']['users_id']!=0){?>
                                    <?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['surname'];?>

                                <?php }else{ ?>
                                    -
                                <?php }?>
                            </td>
                        </tr>
                    <?php } ?>
                    <tr>
                        <th colspan="7">&nbsp;</th>
                    </tr>
                    <tr>
                        <td colspan="3" style="border-bottom: 0px solid white;"><b>Total:</b></td>
                        <td colspan="4" style="border-bottom: 0px solid white;"><b><?php echo $_smarty_tpl->tpl_vars['data']->value['last_sum'];?>
</b></td>
                    </tr>
                    
                </table>
            </div>
        </div>
    </div>
    <div class="right-home">

        <div class="box-right">
            <div>
                <h4>
                    Terms
                </h4>
                <p>
                    <?php echo $_smarty_tpl->tpl_vars['data']->value['client_data']['conditions'];?>

                </p>
                <h4>
                    Users
                </h4>
                <ul>
                    <?php  $_smarty_tpl->tpl_vars["user"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["user"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value['client_users']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["user"]->key => $_smarty_tpl->tpl_vars["user"]->value){
$_smarty_tpl->tpl_vars["user"]->_loop = true;
?>
                        <li>
                            <a class="baseLink" href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=edit_user&user=<?php echo $_smarty_tpl->tpl_vars['user']->value['users_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['user']->value['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['user']->value['surname'];?>
</a>
                        </li>
                    <?php } ?>
                </ul>
                <h4>
                    Type of cooperation
                </h4>
                <p>
                    <?php if (isset($_smarty_tpl->tpl_vars['data']->value['type_of_coop']['type'])){?>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['type_of_coop']['type'];?>

                    <?php }else{ ?>
                        Unfill
                    <?php }?>
                </p>
            </div>
        </div>



        <div class="box-right">
            <div>
                <h4>
                    Contact in AC
                </h4>
                <ul>
                    <?php if ($_smarty_tpl->tpl_vars['data']->value['contact_user']['surname']!=''){?>
                        <li><?php echo $_smarty_tpl->tpl_vars['data']->value['contact_user']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['data']->value['contact_user']['surname'];?>
</li>
                        <li><a href="mailto: <?php echo $_smarty_tpl->tpl_vars['data']->value['contact_user']['email'];?>
" class="baseLink"><?php echo $_smarty_tpl->tpl_vars['data']->value['contact_user']['email'];?>
</a></li>
                        <?php if ($_smarty_tpl->tpl_vars['data']->value['contact_user']['telephone']!=null&&$_smarty_tpl->tpl_vars['data']->value['contact_user']['telephone']!=''){?>
                            <li><?php echo $_smarty_tpl->tpl_vars['data']->value['contact_user']['telephone'];?>
</li>
                        <?php }?>
                    <?php }else{ ?>
                        <li>Unfill</li>
                    <?php }?>
                </ul>
            </div>
        </div>
    </div>

    <div class="clear"></div>

    <div class="full-home">
        <div>
            <h4>
                Active tasks
            </h4>
            <table>
                <tr>
                    <th>Name</th>
                    <th>Added by</th>
                    <th>Added on</th>
                    <th>Deadline</th>
                    <th>Responsible</th>
                    <th>Worker</th>
                </tr>
                <?php  $_smarty_tpl->tpl_vars["task"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["task"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value['tasks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["task"]->key => $_smarty_tpl->tpl_vars["task"]->value){
$_smarty_tpl->tpl_vars["task"]->_loop = true;
?>
                    <tr>
                        <td><?php echo $_smarty_tpl->tpl_vars['task']->value['title'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['task']->value['creator_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['task']->value['creator_info']['surname'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['task']->value['created_format'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['task']->value['deadline_format'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['task']->value['responsible_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['task']->value['responsible_info']['surname'];?>
</td>
                        <td>
                            <?php if ($_smarty_tpl->tpl_vars['task']->value['worker']!=-1){?>
                                <?php echo $_smarty_tpl->tpl_vars['task']->value['worker_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['task']->value['worker_info']['surname'];?>

                            <?php }else{ ?>
                                -
                            <?php }?>
                        </td>
                    </tr>
                <?php } ?>
            </table>
        </div>
    </div>

</div><?php }} ?>